{extend name="common/dialog" /}
{block name="head"}
<link rel="stylesheet" href="__STATIC__/common/css/jquery-ui.css" media="all">
<script type="text/javascript" src="__STATIC__/common/js/jquery-ui.js"></script>
<style type="text/css">

    .body-back{background-color: #fff;}
</style>
{/block}
{block name="main"}
<div class="layui-container">
  <div class="layui-form-box dialog-form-box" style="margin-top:25px;width:500px;">
  <form action="{:U('resetsn')}" class="layui-form nerwork-like dialog-form" id="_form">
    <input name="network_id" value="{$row['id']}" type="hidden" />
    <div class="form-item">
        <div class="form-label">{:lang('Line Name')}</div>
        <div class="form-value">
          <input type="text" name="name" value="{$row['name']}" lay-verify="required" disabled=""  class="">
        </div>
      </div>
    <div class="form-item">
        <div class="form-label">{:lang('Customer No.')}</div>
        <div class="form-value">
          <input type="text" name="value" value="{$row['sn']}" placeholder="{:lang('Please enter the contract number')}">
        </div>
      </div>  
    
    <br/>
    <br/>
    <div class="form-item">
        <div class="form-label"><button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{:lang('Submit')}</button></div>
        <div class="form-value">
        </div>
      </div>
  

  
  </form>
</div>
</div>
{/block}
{block name="footer"}
  <script>
  
  layui.use(['form', 'layer','laydate'], function () {
      var form = layui.form, layer = layui.layer,$= layui.jquery,laydate = layui.laydate;
      var isSubmit = false;
      form.on('submit(submit)', function (data) {
        if(isSubmit){
            return false;
        }
        isSubmit = true;
          loading = layer.load(1,{shade:[0.1,'#fff']});
          // 提交到方法 默认为本身
          $.post($("#_form").attr('action'), data.field, function (res) {
              isSubmit = false;
              layer.close(loading);
              if (res.code  > 0) {
                  layer.msg(res.msg, {time: 1800, icon: 1}, function () {
                      parent.location.reload();
                  });
              } else {
                  layer.msg(res.msg, {time: 1800, icon: 2});
              }
          });
      });
  })
  </script>
{/block}